from flask_restful import reqparse

from api.api import ElasticSearchChangerResource
from api.api import ElasticSearchQueryResource
# from api.db_api import ApiResource


class WechatKOLMatchResource(ElasticSearchQueryResource):
    pass


class WechatKOLMatchMiniResource(ElasticSearchQueryResource):
    pass


class WechatKOLInfoResource(ElasticSearchQueryResource):
    pass


class WechatArticleInfoResource(ElasticSearchQueryResource):
    pass


class WechatArticleMatchResource(ElasticSearchQueryResource):
    pass


class WechatArticleSearchResource(ElasticSearchQueryResource):
    pass


class WechatArticleSearchMiniResource(ElasticSearchQueryResource):
    pass


class WechatArticleAllResource(ElasticSearchQueryResource):
    pass


class WechatCategoriesResource(ElasticSearchQueryResource):
    pass


class WechatTagsResource(ElasticSearchQueryResource):
    pass


class WechatContentTypeTagsResource(ElasticSearchQueryResource):
    pass


class WechatDataOverviewResource(ElasticSearchQueryResource):
    pass


class WechatTrendAnalyzeResource(ElasticSearchQueryResource):
    pass


class WechatTimeSlotAnalyzeResource(ElasticSearchQueryResource):
    pass


class WechatContentAnalyzeResource(ElasticSearchQueryResource):
    pass


class WechatInfluenceResource(ElasticSearchQueryResource):
    pass


class WechatContentAnalyzeAllResource(ElasticSearchQueryResource):
    pass


class WechatTrendInfluenceAllResource(ElasticSearchQueryResource):
    pass


class WechatTimeSlotAnalyzeAllResource(ElasticSearchQueryResource):
    pass


class WechatKeywordHeatResource(ElasticSearchQueryResource):
    pass


class WechatMultiKeywordHeatResource(ElasticSearchQueryResource):
    pass


class WechatBrandKOLMatchResource(ElasticSearchQueryResource):
    pass


# changer
class WechatKOLChangerResource(ElasticSearchChangerResource):
    pass


class Wechat8APIWrapperResource(ElasticSearchChangerResource):
    pass


class WechatKOLSearchWordsResource(ElasticSearchQueryResource):
    pass


class WechatRecommendResource(ElasticSearchQueryResource):
    pass


class WechatWord2VecTitleSearchResource(ElasticSearchQueryResource):
    pass


class WechatWord2VecTextSearchResource(ElasticSearchQueryResource):
    pass


class WechatWordAssocTitleSearchResource(ElasticSearchQueryResource):
    pass


class WechatWordAssocTextSearchResource(ElasticSearchQueryResource):
    pass


class WechatArticleSearchMXResource(ElasticSearchQueryResource):
    pass


class WechatKOLMatchMXResource(ElasticSearchQueryResource):
    pass


class WechatWordDfDailyResource(ElasticSearchQueryResource):
    pass


class WechatPubStatResource(ElasticSearchQueryResource):
    pass


class WechatPubStatMultiResource(ElasticSearchQueryResource):
    pass


class WechatArticleSearchBackendResource(ElasticSearchQueryResource):
    pass


class WechatKOLMatchBackendResource(ElasticSearchQueryResource):
    pass


class WechatKeywordCloudSimResource(ElasticSearchQueryResource):
    pass


class WechatKeywordCloudAssocResource(ElasticSearchQueryResource):
    pass


class WechatParaSearchResource(ElasticSearchQueryResource):
    pass


class WechatParaSearchTextResource(ElasticSearchQueryResource):
    pass


class WechatTitleClusteringResource(ElasticSearchQueryResource):
    pass


class ArticleSearchResource(ElasticSearchQueryResource):
    pass


class ArticleInfoResource(ElasticSearchQueryResource):
    pass


class ParaCombineResource(ElasticSearchQueryResource):
    pass


class ArticleHBASEResource(ElasticSearchQueryResource):
    pass


class WechatUserPubStatMultiResource(ElasticSearchQueryResource):
    pass


class WechatUserInfoAnalysisResource(ElasticSearchQueryResource):
    pass


class CommunicationAnalysisMultiResource(ElasticSearchQueryResource):
    pass


class PopularKolResource(ElasticSearchQueryResource):
    pass


class HotWordTrendResource(ElasticSearchQueryResource):
    pass


class MovieArticleResource(ElasticSearchQueryResource):
    pass


class DramaArticleResource(ElasticSearchQueryResource):
    pass


class TVShowArticleResource(ElasticSearchQueryResource):
    pass


class StarArticleResource(ElasticSearchQueryResource):
    pass


class MovieInfoResource(ElasticSearchQueryResource):
    pass


class StarInfoResource(ElasticSearchQueryResource):
    pass


class DramaInfoResource(ElasticSearchQueryResource):
    pass


class TVShowInfoResource(ElasticSearchQueryResource):
    pass


class ArticleOriginalityCheckResource(ElasticSearchQueryResource):
    pass


wechat_kol_changer_parser = reqparse.RequestParser()
wechat_kol_changer_parser.add_argument('youka_id', type=str, location='json')
wechat_kol_changer_parser.add_argument('biz_code', type=str, location='json')
wechat_kol_changer_parser.add_argument('data', type=dict, location='json')

wechat_article_info_parser = reqparse.RequestParser()
wechat_article_info_parser.add_argument('youka_id', type=str, location='json')
wechat_article_info_parser.add_argument('url', type=str, location='json')
wechat_article_info_parser.add_argument('urls', type=list, location='json')
wechat_article_info_parser.add_argument('ids', type=list, location='json')

wechat_kol_match_parser = reqparse.RequestParser()
wechat_kol_match_parser.add_argument('youka_id', type=str, location='json')
wechat_kol_match_parser.add_argument('term', type=str, location='json')
wechat_kol_match_parser.add_argument('filters', type=dict, location='json')
wechat_kol_match_parser.add_argument('order_by', type=str, location='json')
wechat_kol_match_parser.add_argument('from', type=int, location='json')
wechat_kol_match_parser.add_argument('size', type=int, location='json')
wechat_kol_match_parser.add_argument('filter_keywords', type=list, location='json')
wechat_kol_match_parser.add_argument('biz_code', type=str, location='json')
wechat_kol_match_parser.add_argument('biz_codes', type=list, location='json')
wechat_kol_match_parser.add_argument('brand', type=str, location='json')
wechat_kol_match_parser.add_argument('highlight', type=bool, location='json')
wechat_kol_match_parser.add_argument('backend', type=bool, location='json')

wechat_article_match_parser = reqparse.RequestParser()
wechat_article_match_parser.add_argument('youka_id', type=str, location='json')
wechat_article_match_parser.add_argument('biz_code', type=str, location='json')
wechat_article_match_parser.add_argument('term', type=str, location='json')
wechat_article_match_parser.add_argument('order_by', type=str, location='json')
wechat_article_match_parser.add_argument('from', type=int, location=['args', 'json'])
wechat_article_match_parser.add_argument('size', type=int, location=['args', 'json'])
wechat_article_match_parser.add_argument('filters', type=dict, location='json')
wechat_article_match_parser.add_argument('highlight', type=bool, location='json')
wechat_article_match_parser.add_argument('ids', type=list, location='json')
wechat_article_match_parser.add_argument('analyze', type=bool, location='json')
wechat_article_match_parser.add_argument('n_cluster', type=int, location='json')
wechat_article_match_parser.add_argument('deduplicate', type=bool, location='json')
wechat_article_match_parser.add_argument('filter_keywords', type=list, location='json')

wechat_data_analyze_parser = reqparse.RequestParser()
wechat_data_analyze_parser.add_argument('youka_id', type=str, location='json')
wechat_data_analyze_parser.add_argument('term', type=str, location='json')
wechat_data_analyze_parser.add_argument('biz_code', type=str, location='json')
wechat_data_analyze_parser.add_argument('biz_codes', type=list, location='json')
wechat_data_analyze_parser.add_argument('from', type=str, location='json')
wechat_data_analyze_parser.add_argument('to', type=str, location='json')
wechat_data_analyze_parser.add_argument('filters', type=dict, location='json')
wechat_data_analyze_parser.add_argument('time_slot_type', type=str, location='json')
wechat_data_analyze_parser.add_argument('by_field', type=str, location='json')
wechat_data_analyze_parser.add_argument('by', type=list, location='json')

wechat_article_recommend_parser = reqparse.RequestParser()
wechat_article_recommend_parser.add_argument('youka_id', type=str, location='json')
wechat_article_recommend_parser.add_argument('ids', type=list, location='json')
wechat_article_recommend_parser.add_argument('push_ids', type=list, location='json')
wechat_article_recommend_parser.add_argument('size', type=int, location='json')
wechat_article_recommend_parser.add_argument('from', type=int, location='json')
wechat_article_recommend_parser.add_argument('filters', type=dict, location='json')

id_parser = reqparse.RequestParser()
id_parser.add_argument('youka_id', type=str, location='args')
id_parser.add_argument('id', type=str, location='args')

word2vec_parser = reqparse.RequestParser()
word2vec_parser.add_argument('youka_id', type=str, location='json')
word2vec_parser.add_argument('word', type=str, location='json')
word2vec_parser.add_argument('year', type=str, location='json')
word2vec_parser.add_argument('week', type=str, location='json')
word2vec_parser.add_argument('need_df', type=bool, location='json')
word2vec_parser.add_argument('words', type=list, location='json')

word_df_daily_parser = reqparse.RequestParser()
word_df_daily_parser.add_argument('youka_id', type=str, location='json')
word_df_daily_parser.add_argument('word', type=str, location='json')
word_df_daily_parser.add_argument('date', type=str, location='json')

pub_stat_parser = reqparse.RequestParser()
pub_stat_parser.add_argument('youka_id', type=str, location='json')
pub_stat_parser.add_argument('word', type=str, location='json')
pub_stat_parser.add_argument('keywords', type=list, location='json')
pub_stat_parser.add_argument('from_date', type=str, location='json')
pub_stat_parser.add_argument('to_date', type=str, location='json')
pub_stat_parser.add_argument('filters', type=dict, location='json')
pub_stat_parser.add_argument('field', type=str, location='json')

wechat_article_search_mx_parser = reqparse.RequestParser()
wechat_article_search_mx_parser.add_argument('youka_id', type=str, location='json')
wechat_article_search_mx_parser.add_argument('term', type=str, location='json')
wechat_article_search_mx_parser.add_argument('festivals', type=list, location='json')
wechat_article_search_mx_parser.add_argument('filters', type=dict, location='json')
wechat_article_search_mx_parser.add_argument('hot_events', type=list, location='json')
wechat_article_search_mx_parser.add_argument('order_by', type=str, location='json')
wechat_article_search_mx_parser.add_argument('from', type=int, location='json')
wechat_article_search_mx_parser.add_argument('size', type=int, location='json')
wechat_article_search_mx_parser.add_argument('filter_keywords', type=list, location='json')
wechat_article_search_mx_parser.add_argument('highlight', type=bool, location='json')
wechat_article_search_mx_parser.add_argument('analyze', type=bool, location='json')
wechat_article_search_mx_parser.add_argument('n_cluster', type=int, location='json')
wechat_article_search_mx_parser.add_argument('deduplicate', type=bool, location='json')
wechat_article_search_mx_parser.add_argument('wordcloud', type=bool, location='json')
wechat_article_search_mx_parser.add_argument('exact', type=bool, location='json')

wechat_kol_match_mx_parser = reqparse.RequestParser()
wechat_kol_match_mx_parser.add_argument('youka_id', type=str, location='json')
wechat_kol_match_mx_parser.add_argument('term', type=str, location='json')
wechat_kol_match_mx_parser.add_argument('festivals', type=list, location='json')
wechat_kol_match_mx_parser.add_argument('filters', type=dict, location='json')
wechat_kol_match_mx_parser.add_argument('hot_events', type=list, location='json')
wechat_kol_match_mx_parser.add_argument('order_by', type=str, location='json')
wechat_kol_match_mx_parser.add_argument('from', type=int, location='json')
wechat_kol_match_mx_parser.add_argument('size', type=int, location='json')
wechat_kol_match_mx_parser.add_argument('filter_keywords', type=list, location='json')

wechat_para_search_parser = reqparse.RequestParser()
wechat_para_search_parser.add_argument('youka_id', type=str, location='json')
wechat_para_search_parser.add_argument('term', type=str, location='json')
wechat_para_search_parser.add_argument('from', type=int, location='json')
wechat_para_search_parser.add_argument('size', type=int, location='json')
wechat_para_search_parser.add_argument('filters', type=dict, location='json')
wechat_para_search_parser.add_argument('deduplicate', type=bool, location='json')
wechat_para_search_parser.add_argument('highlight', type=bool, location='json')

article_search_parser = reqparse.RequestParser()
article_search_parser.add_argument('youka_id', type=str, location='json')
article_search_parser.add_argument('term', type=str, location='json')
article_search_parser.add_argument('festivals', type=list, location='json')
article_search_parser.add_argument('filters', type=dict, location='json')
article_search_parser.add_argument('hot_events', type=list, location='json')
article_search_parser.add_argument('order_by', type=str, location='json')
article_search_parser.add_argument('from', type=int, location='json')
article_search_parser.add_argument('size', type=int, location='json')
article_search_parser.add_argument('filter_keywords', type=list, location='json')
article_search_parser.add_argument('highlight', type=bool, location='json')
article_search_parser.add_argument('analyze', type=bool, location='json')
article_search_parser.add_argument('n_cluster', type=int, location='json')
article_search_parser.add_argument('deduplicate', type=bool, location='json')
article_search_parser.add_argument('wordcloud', type=bool, location='json')
article_search_parser.add_argument('exact', type=bool, location='json')
article_search_parser.add_argument('image_search', type=bool, location='json')
article_search_parser.add_argument('method', type=str, location='json')


article_originality_check_parser = reqparse.RequestParser()
article_originality_check_parser.add_argument('youka_id', type=str, location='json')
article_originality_check_parser.add_argument('title', type=str, location='json')
article_originality_check_parser.add_argument('text', type=str, location='json')
article_originality_check_parser.add_argument('filters', type=dict, location='json')
article_originality_check_parser.add_argument('from', type=int, location='json')
article_originality_check_parser.add_argument('size', type=int, location='json')


article_info_parser = reqparse.RequestParser()
article_info_parser.add_argument('youka_id', type=str, location='json')
article_info_parser.add_argument('ids', type=list, location='json')
article_info_parser.add_argument('article_id', type=str, location='json')
article_info_parser.add_argument('image_search', type=bool, location='json')

para_combine_parser = reqparse.RequestParser()
para_combine_parser.add_argument('youka_id', type=str, location='json')
para_combine_parser.add_argument('url', type=str, location='json')

only_hotter_parser = reqparse.RequestParser()
only_hotter_parser.add_argument('youka_id', type=str, location='json')
only_hotter_parser.add_argument('arg_dict', type=dict, location='json')
only_hotter_parser.add_argument('term', type=str, location='json')
